<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <ul id="container"></ul>
  <script>
  const total = 100000;
  const ul = document.getElementById('container')
  for (let i=0;i<total;i++){
    const liNode = document.createElement('li');
    liNode.innerText = Math.random()*total;
    ul.appendChild(liNode)
  }
  let end = Date.now();
  console.log('时间',end -start);
  setTimeout(() => {
    const end1 = date.now();
    console.log('渲染时间',end1 -end);
  }, 0);
  </script>
</body>
</html>